package game.metalmax.animation
{
	import game.metalmax.animation.zone.SceneZone;
	import game.metalmax.entity.character.Character;
	import game.metalmax.entity.character.Hero;
	import game.metalmax.entity.character.Npc;
	import game.metalmax.module.character.CharacterManager;
	import game.metalmax.module.character.CharacterProxy;
	
	import showtime.framework.engine.World2D;
	import showtime.framework.mvc.patterns.facade.Facade;
	

	public class NpcSOB extends CharacterSOB
	{
		public function NpcSOB(source:Npc)
		{
			super(source);	
			
		}
	
		override public function click():void
		{
			var hero:Hero = CharacterManager.getInstance().parseCharacterToHero(Character(source));
			CharacterManager.getInstance().heros.push(hero);
			CharacterProxy(Facade.getInstance().retrieveProxy(String(CharacterProxy))).addHeroC2S(hero);
			CharacterManager.getInstance().addHeroToTeam(hero);
			
			SceneZone(World2D.scene).map.removeObject(this);	

		}
	}
}